export const baseRoutes =
    [
        {
            path: '/',
            component: () => import('@/views/layout/index.vue'),
            name: 'layout',
            meta:{
                hidden:false,
            },
            redirect: "/home",
            children: [
                {
                    path: '/home',
                    component: () => import('@/views/home/index.vue'),
                    name: 'home',
                    meta:{
                        title:"首页",
                        hidden:false,
                        icon:"HomeFilled",
                    }
                },
            ]

        },
        {
            path: '/login',
            component: () => import('@/views/login/index.vue'),
            name: 'login',
            meta:{
                title:"登录",
                hidden:true
            }
        },
        {
            path: '/404',
            component: () => import('@/views/404/index.vue'),
            name: '404',
            meta:{
                hidden:true
            }
        },
        {
            path: '/system',
            component: () => import('@/views/layout/index.vue'),
            name: 'system',
            meta:{
                title: "系统管理",
                hidden:false,
                icon:"Setting",
            },
            children:[
                {
                    path: '/system/user',
                    component: () => import('@/views/system/user/index.vue'),
                    name: 'user',
                    meta:{
                        title: "用户管理",
                        hidden:false,
                        icon:'User'
                    }
                },
                {
                    path:"/system/permission",
                    name:"permission",
                    component:()=>import('@/views/system/permission/index.vue'),
                    meta:{
                        title:"角色管理",
                        icon:"Avatar",
                    }
                },
                {
                    path: "/system/menu",
                    name:"menu",
                    component:()=>import('@/views/system/menu/index.vue'),
                    meta:{
                        title:"菜单管理",
                        icon:"Menu",
                    }
                }
            ]
        },
        // {
        //     path: "/:pathMatch(.*)*",
        //     component:()=>import('@/views/404/index.vue'),
        //     name:'any'
        // },

        //对于不存在的链接，会重定向到404路径
        {
            path: "/:pathMatch(.*)*",
            redirect: '/404',
            name: 'any',
            meta:{
                hidden:true
            }
        },
    ]